/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ForecastAnalysisPanel.java
 *
 * Created on 2011-10-19, 23:27:27
 */
package com.football.lottery.ui;

import javax.swing.table.DefaultTableModel;

/**
 *
 * @author JingWen.Wen
 */
public class ForecastAnalysisPanel extends javax.swing.JPanel
{
  private DefaultTableModel model;
  /** Creates new form ForecastAnalysisPanel */
  public ForecastAnalysisPanel()
  {
    initComponents();
    initData();
    setVisible(true);
  }

  /** This method is called from within the constructor to
   * initialize the form.
   * WARNING: Do NOT modify this code. The content of this method is
   * always regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        byAuthorButt = new javax.swing.JButton();
        byTypeButt = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        dataTable = new javax.swing.JTable();

        setLayout(new java.awt.BorderLayout());

        byAuthorButt.setText(org.openide.util.NbBundle.getMessage(ForecastAnalysisPanel.class, "ForecastAnalysisPanel.byAuthorButt.text")); // NOI18N
        jPanel1.add(byAuthorButt);

        byTypeButt.setText(org.openide.util.NbBundle.getMessage(ForecastAnalysisPanel.class, "ForecastAnalysisPanel.byTypeButt.text")); // NOI18N
        jPanel1.add(byTypeButt);

        add(jPanel1, java.awt.BorderLayout.PAGE_END);

        jPanel2.setLayout(new java.awt.BorderLayout());

        dataTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Came From", "Author", "Total", "AVG Investment", "Hit Rate", "Best Hit", "13 Hits", "14 Hits"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(dataTable);
        dataTable.getColumnModel().getColumn(0).setHeaderValue(org.openide.util.NbBundle.getMessage(ForecastAnalysisPanel.class, "ForecastAnalysisPanel.dataTable.columnModel.title0")); // NOI18N
        dataTable.getColumnModel().getColumn(1).setHeaderValue(org.openide.util.NbBundle.getMessage(ForecastAnalysisPanel.class, "ForecastAnalysisPanel.dataTable.columnModel.title1")); // NOI18N
        dataTable.getColumnModel().getColumn(2).setHeaderValue(org.openide.util.NbBundle.getMessage(ForecastAnalysisPanel.class, "ForecastAnalysisPanel.dataTable.columnModel.title2")); // NOI18N
        dataTable.getColumnModel().getColumn(3).setHeaderValue(org.openide.util.NbBundle.getMessage(ForecastAnalysisPanel.class, "ForecastAnalysisPanel.jTable1.columnModel.title7")); // NOI18N
        dataTable.getColumnModel().getColumn(4).setHeaderValue(org.openide.util.NbBundle.getMessage(ForecastAnalysisPanel.class, "ForecastAnalysisPanel.jTable1.columnModel.title3")); // NOI18N
        dataTable.getColumnModel().getColumn(5).setHeaderValue(org.openide.util.NbBundle.getMessage(ForecastAnalysisPanel.class, "ForecastAnalysisPanel.jTable1.columnModel.title4")); // NOI18N
        dataTable.getColumnModel().getColumn(6).setHeaderValue(org.openide.util.NbBundle.getMessage(ForecastAnalysisPanel.class, "ForecastAnalysisPanel.jTable1.columnModel.title5")); // NOI18N
        dataTable.getColumnModel().getColumn(7).setHeaderValue(org.openide.util.NbBundle.getMessage(ForecastAnalysisPanel.class, "ForecastAnalysisPanel.jTable1.columnModel.title6")); // NOI18N

        jPanel2.add(jScrollPane1, java.awt.BorderLayout.CENTER);

        add(jPanel2, java.awt.BorderLayout.CENTER);
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton byAuthorButt;
    private javax.swing.JButton byTypeButt;
    private javax.swing.JTable dataTable;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    // End of variables declaration//GEN-END:variables

  private void initData()
  {
    this.model = (DefaultTableModel) dataTable.getModel();
  }
}
